package com.auto.service.impl.coder.tree.web;

import java.util.HashMap;
import java.util.Map;
import com.auto.service.impl.BaseCoder;
import com.auto.service.impl.Coder;
import com.common.Global;

/**
 * 处理页面所有的模板
 * @author chenfuqiang
 *
 */
public class JS_StoreCoder extends BaseCoder implements Coder{
	
	private final String TEMPLATE_PATH = "/tree/web/store.ftl";
	private final String CLASSTAIL = ".js";
	
	@Override
	public Map<String, Object> getRoot(Class<?> pojo) {
		Map<String,Object> root = new HashMap<String, Object>();
		root.put("showWay","TREE");
		root.put("author", Global.AUTHOR);
		root.put("package", Global.JS_STORE_PACKAGE);
		root.put("className", pojo.getSimpleName());
		root.put("paramName", pojo.getSimpleName().substring(0,1).toLowerCase()+pojo.getSimpleName().substring(1));
		return root;
	}
	
	@Override
	public String getTargetPackage() {
		return Global.JS_STORE_PACKAGE;
	}

	@Override
	public String getSrcPath() {
		return Global.JSSRCPATH;
	}

	@Override
	public String getFtlPath() {
		return this.TEMPLATE_PATH;
	}

	@Override
	public String getClassTail() {
		return this.CLASSTAIL;
	}

}
